package com.zry.simpleBlog.comment.utils;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author zry
 * @create 2022-06-19 22:40
 */
public class FileUtil {
    /**
     * 图片允许的后缀扩展名
     */
    public final static List<String> IMAGE_FILE_SUFFIX = new ArrayList<>(Arrays.asList("png", "bmp", "jpg", "jpeg", "pdf", "JPG"));

    public static boolean isFileAllowed(String fileName) {
        return IMAGE_FILE_SUFFIX.contains(fileName);
    }
}
